<%@page import="com.drerp.BI.LogicaBI"%>
<%@page import="com.drerp.BI.RH.LogicaRH"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../js/jscharts.js"></script>

<title>Médicos Contratados por Ano</title>
</head>

<body>
<div id="graph">Loading...</div>
<% LogicaBI logicaBI = new LogicaBI(); %>
<script type="text/javascript">
	
	var myData = new Array(['Jan', <%= logicaBI.getMedicosPorAno(0)%>], ['Feb', <%= logicaBI.getMedicosPorAno(1)%>], ['Mar', <%= logicaBI.getMedicosPorAno(2)%>], 
			['Apr', <%= logicaBI.getMedicosPorAno(3)%>], ['May', <%= logicaBI.getMedicosPorAno(4)%>], ['Jun', <%= logicaBI.getMedicosPorAno(5)%>], 
			['Jul', <%= logicaBI.getMedicosPorAno(6)%>], ['Aug', <%= logicaBI.getMedicosPorAno(7)%>], ['Sep', <%= logicaBI.getMedicosPorAno(8)%>], 
			['Oct', <%= logicaBI.getMedicosPorAno(9)%>], ['Nov', <%= logicaBI.getMedicosPorAno(10)%>], ['Dec', <%= logicaBI.getMedicosPorAno(11)%>]);
	var colors = ['#CE0000', '#EF2323', '#D20202', '#A70000', '#850000', '#740000', '#530000', '#850000', '#B00000', '#9C0404', '#CE0000', '#BA0000'];
	var myChart = new JSChart('graph', 'bar');
	myChart.setDataArray(myData);
	myChart.colorizeBars(colors);
	myChart.setDataArray(myData);
	myChart.setTitle('Médicos Contratados por Ano');
	myChart.setAxisColor('#9D9F9D');
	myChart.setAxisWidth(1);
	myChart.setAxisNameX('Meses');
	myChart.setAxisNameY('Médicos');
	myChart.setAxisNameColor('#655D5D');
	myChart.setAxisNameFontSize(9);
	myChart.setAxisPaddingLeft(50);
	myChart.setAxisValuesDecimals(1);
	myChart.setAxisValuesColor('#9C1919');
	myChart.setTextPaddingLeft(0);
	myChart.setBarValuesColor('#9C1919');
	myChart.setBarBorderWidth(0);
	myChart.setTitleColor('#8C8382');
	myChart.setGridColor('#5D5F5D');
	myChart.draw();
	
</script>
<table border="1">
<tr>
<th>Mês</th>
<th>Quantidade</th>
</tr>
<tr>
<td>Janeiro</td>
<td><%= logicaBI.getMedicosPorAno(0)%></td>
</tr>
<tr>
<td>Fevereiro</td>
<td><%= logicaBI.getMedicosPorAno(1)%></td>
</tr>
<tr>
<td>Março</td>
<td><%= logicaBI.getMedicosPorAno(2)%></td>
</tr>
<tr>
<td>Abril</td>
<td><%= logicaBI.getMedicosPorAno(3)%></td>
</tr>
<tr>
<td>Maio</td>
<td><%= logicaBI.getMedicosPorAno(4)%></td>
</tr>
<tr>
<td>Junho</td>
<td><%= logicaBI.getMedicosPorAno(5)%></td>
</tr>
<tr>
<td>Julho</td>
<td><%= logicaBI.getMedicosPorAno(6)%></td>
</tr>
<tr>
<td>Agosto</td>
<td><%= logicaBI.getMedicosPorAno(7)%></td>
</tr>
<tr>
<td>Setembro</td>
<td><%= logicaBI.getMedicosPorAno(8)%></td>
</tr>
<tr>
<td>Outubro</td>
<td><%= logicaBI.getMedicosPorAno(9)%></td>
</tr>
<tr>
<td>Novembro</td>
<td><%= logicaBI.getMedicosPorAno(10)%></td>
</tr>
<tr>
<td>Dezembro</td>
<td><%= logicaBI.getMedicosPorAno(11)%></td>
</tr>
</table>

</body>
</html>
